import axios from 'axios';
import { HOST, OdataHOST } from './constant';
import o from 'odata';
export const odata = o().config({
  endpoint: OdataHOST,
  version: 4,
  strictMode: true,
  error: function(res) {
    console.log(JSON.stringify(res));
  }
  // appending: [{ name: 'token', value: token }]
});
const axiosIns = axios.create({
  baseURL: HOST,
  timeout: 1000
  // headers: { 'content-type': 'application/json', 'Accept': 'application/json' },
});

export default axiosIns;

export const axiosOdata = axios.create({
  baseURL: OdataHOST,
  timeout: 5000,
  maxContentLength: 200000
});
